listview: Only allocate necesary rows
authorBenjamin Otte <otte@redhat.com>
Tue, 25 Sep 2018 23:37:38 +0000 (01:37 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 30 May 2020 23:26:45 +0000 (19:26 -0400)
commitb64da6d26820840354ff8880c7fc13b70ffffe34
tree61bb95d6908a5d55f920f91d6084d954be4996de
parent2ba2a216cabae74d26ad445a580ac1b151d34b41
listview: Only allocate necesary rows

This is the big one.

The listview only allocates 200 rows around the visible row now.
Everything else is kept in ListRow instances with row->widget == NULL.

For rows without a widget, we assign the median height of the child
widgets as the row's height and then do all calculations as if there
were widgets that had requested that height (like setting adjustment
values or reacting to adjustment value changes).

When the view is scrolled, we bind the 200 rows to the new visible area,
so that the part of the listview that can be seen is always allocated.
gtk/gtklistview.c